package com.example.kafka.kerberos.kafka;

import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author stone
 * @version $1.0
 * @date 2020/9/14 17:20:58
 */
@Service
public class MyProducer {

    @Resource
    private KafkaTemplate<String, String> kafkaTemplate;

    public void send(String topicName, String value) {
        kafkaTemplate.send(topicName,value);
    }

}